#ifndef ENCODE_H__
#define ENCODE_H__

#include "common/commonDefFun.h"

#ifdef __cplusplus
extern "C"
{

#endif


#ifndef _WIN32

    int GB2312ToUTF8( char const *srcStr, char* desBuff, int desBuffLength);

	int UTF8ToGB2312(char const *srcStr, char* desBuff, int desBuffLength);

#else	

#endif // !WIN32

	/**
	* UTF-8 to GBK
	* @param src [in]
	* @param dst [out]
	* @param len [in] The most bytes which starting at dst, will be written.
	*
	*/
	TOOL_SDK_API void DLL_SPEC utf8_to_gb(const char* src, char* dst, int len);

	/**
	* GBK to UTF-8
	*
	* @param src [in]
	* @param dst [out]
	* @param len [in] The most bytes which starting at dst, will be written.
	*/
	TOOL_SDK_API void DLL_SPEC gb_to_utf8(const char* src, char* dst, int len);

#ifdef __cplusplus
} //end of extern "C" {
#endif

#endif //__ENCODE_H_